import serial  # python串口库
import serial.tools.list_ports

port_list = list(serial.tools.list_ports.comports())
print(port_list)
